package cn.ewan.cloud.tenant.data.router.spring.config;

import cn.ewan.cloud.tenant.data.router.core.business.config.tenant.TenantUser;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.List;

/**
 * @author lgh
 * @date 2022/12/15 10:44
 */
@ConfigurationProperties(prefix = TenantConfig.PREFIX)
@Data
@RefreshScope
public class TenantConfig {


    /**
     * 配置前缀
     */
    public static final String PREFIX = "spring.tenant";


    /**
     * 租户与租户属性的关系 (tenant, tenant-user)
     */
    private List<TenantUser> users;

}
